package com.example.mapper;

import com.example.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {

    //添加
    @Insert("insert into user (username, password,registerTime) values (#{username}, #{password},#{NOW()})")
    void insertUser(String username,String password);


    //查询
    @Select("select * from user where username = #{username}")
    User queryUser(String username);

}